import service from "./service"

const http = {
    get(param, url) {
        const config = {
            method: 'get',
            params: param ? param : undefined,
            url: url
        }
        return service(config)
    },
    post(param, url) {
        const config = {
            method: 'post',
            data: param ? param : undefined,
            url: url
        }
        return service(config)
    },
    put(param, url) {
        const config = {
            method: 'put',
            params: param ? param : undefined,
            url: url
        }
        return service(config)
    },
    delete(param, url) {
        const config = {
            method: 'delete',
            params: param ? param : undefined,
            url: url
        }
        return service(config)
    }
}

export default http